import {take,call,put,select} from 'redux-saga/effects'
import {actionsTypes as SActionTypes} from '../reducers/search'

export function* update_result (data) {
    return data
}

export function* updateResultFlow () {
    while (true){
        let req = yield take(SActionTypes.UPDATE_RESULT);
        let res = yield call(update_result, req.data);
        if(res){
            yield put({type: SActionTypes.UPDATED_RESULT, data: res})
        }
    }
}